##############################################################################
# FormMail Version 1.6 #
# Copyright 1996-1997 Matt Wright mattw@worldwidemart.com #
# Created 06/09/95 Last Modified 05/02/97 #
# Matt's Script Archive, Inc.: http://www.worldwidemart.com/scripts/ #
##############################################################################
# If you run into any problems while trying to configure this scripts, help #
# is available. The steps you should take to get the fastest results, are: #
# 1) Read this file thoroughly. #
# 2) Consult the Matt's Script Archive Frequently Asked Questions: #
# http://www.worldwidemart.com/scripts/faq/ #
# 3) If you are still having difficulty installing this script, send #
# e-mail to: scripts-help@tahoenet.com #
# Include any error messages you are receiving and as much detail #
# as you can so we can spot your problem. Also include the variable#
# configuration block that is located at the top of the script. #
# #
# Hopefully we will be able to help you solve your problems. Thank you. #
##############################################################################
# COPYRIGHT NOTICE #
# Copyright 1995 - 1997 Matthew M. Wright All Rights Reserved. #
# #
# FormMail may be used and modified free of charge by anyone so long as this #
# copyright notice and the comments above remain intact. By using this #
# code you agree to indemnify Matthew M. Wright from any liability that #
# might arise from its use. #
# #
# Selling the code for this program without prior written consent is #
# expressly forbidden. In other words, please ask first before you try and #
# make money off of my program. #
# #
# Obtain permission before redistributing this software over the Internet or #
# in any other medium. In all cases copyright and header must remain intact #
##############################################################################
FormMail is a universal WWW form to E-mail
gateway. There is only one required form input tag
which must be specified in order for this script to
work with your existing forms. Other hidden
configuration fields can also be used to enhance the
operation of FormMail on your site. Version 1.6 of
FormMail contains a few minor bug fixes, optimized
code and more comments. The biggest change in this
version is that by default, form fields are now
sorted as they appear in the form. Error pages were
also beautified a little and two new configuration
fields were created. Read the History for a more
complete list of changes.
The script, FormMail.pl, needs to be placed in
your server's cgi-bin and the anonymous WWW user must
have the ability to read/execute the script. If you
do not have access to your server's cgi-bin, yet you
can execute cgi scripts, you may want to try adding a
.cgi extension to the FormMail.pl, so you could move
it to FormMail.cgi.
- The FormMail.pl script does not have to be
extensively configured in order to work. There
are only two variables in the perl file which you
will need to define along with changing the top
line of your script to match the location of you
Perl interpreter.
- $mailprog =
'/usr/lib/sendmail';
- This variable must define the
location to your server's sendmail
program. If this is incorrect, form
results will not be mailed to you.
- @referers =
('worldwidemart.com','206.31.72.203');
- This array allows you to define the
domains that you will allow forms to
reside on and use your FormMail
script. If a user tries to put a form
on another server, that is not
worldwidemart.com, they will receive
an error message when someone tries
to fill out their form. By placing
worldwidemart.com in the @referers
array, this also allows
www.worldwidemart.com,
ftp.worldwidemart.com, any other http
address with worldwidemart.com in it
and worldwidemart.com's IP address to
access this script as well, so no
users will be turned away.
Your formmail program is now configured.
- You want to have a form that will be mailed to
you, but aren't sure how to write the CGI script
for it.
- You are the webmaster of your site and want to
allow users to use forms, but not to have their
own cgi-bin directories, which can cause security
risks to your system. You can set this script up
and then allow all users to run off of it.
- Want to have one script to parse all of your html
forms and mail them to you.
Version 1.0 06/11/95 - This script was created.
Version 1.1 08/03/95 - A major hole in the script which allowed
users to run commands under your server's
uid was disabled, thanks to Paul Phillips
who noticed the error.
- The ability to redirect the user to a
specified HTML file after they filled
out a form was added.
Version 1.2 09/23/95 - If the form field is one of the required
or optional 'special' fields, such as
redirect, recipient, subject, email,
realname, etc... the script will not
print these fields to either your mail
message or to the user's screen when they
are returned to a generic form response.
It helps you so that things do not get
duplicated.
Version 1.3 01/21/96 - Much needed update finally completed
- Added form fields: env_report, bgcolor,
background, link_color, vlink_color,
title, text_color, return_link_title,
return_link_title, and required.
- Security hole, which allowed any user on
any system to bum off of your formmail
script, has been plugged up with the
@referers variable.
- Report style in return html and e-mail
touched up a bit.
Version 1.4 01/23/96 - Added options: sort, alink_color
- Fixed a few bugs from Version 1.3, namely
the fact that the link_colors weren't
working well.
- FormMail now supports both the GET and
POST methods.
Version 1.5 02/05/96 - Sorting of Fields in E-Mail Response
Fixed.
- print_config option added.
Version 1.6 05/02/97 - Sorting of fields by default was fixed to
now sort in the order the fields are
passed to FormMail from the web browser,
which is usually the same order as they
appear in the HTML form.
- The sort order: directive, env_report and
print_config parsing routines were made
to better compensate for line breaks and
extra spaces in input for ease of use.
- Redirect error causing the redirect
option to incorrectly work with https
(secure servers) was fixed.
- Output of non-filled in form fields
suppressed.
- E-mail addresses checked for correct
syntax if designated a required field.
- Fields only printed if they contain a
value or if the print_blank_fields option
is set to 1.
- missing_fields_redirect added so you can
route users who don't completely fill out
the form to a pre-made HTML page.
- Parts of code optimized, especially in
respect to the way config variables are
handled.
[ Mega
Script Archive ]
|